import request from '@/utils/request'

export function createService(data){
  return request({ url: '/api/service-contrib', method: 'post', data })
}
export function getMyServices(){
  return request({ url: '/api/service-contrib/mine', method: 'get' })
}
export function updateService(id, data){
  return request({ url: `/api/service-contrib/${id}`, method: 'put', data })
}
export function deleteService(id){
  return request({ url: `/api/service-contrib/${id}`, method: 'delete' })
}

// admin
export function getAllServices(params){
  return request({ url: '/api/service-contrib/all', method: 'get', params })
}
export function reviewService(id, data){
  return request({ url: `/api/service-contrib/${id}/review`, method: 'post', data })
}


